package com.znyj.servlet.sqlHelper;

/**
 * Created by nameless on 15-2-13.
 */
public class Order {

    public enum Sort {
        ASC("ASC"), DESC("DESC");
        private String value;

        Sort(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    private String fieldName;

    private Sort sort;

    public Order(String fieldName, Sort sort) {
        this.fieldName = fieldName;
        this.sort = sort;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public Sort getSort() {
        return sort;
    }

    public void setSort(Sort sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "Order{" +
                "fieldName='" + fieldName + '\'' +
                ", sort=" + sort +
                '}';
    }
}
